package com.quanxiaoha.xiaohashu.oss.biz.config;


import io.minio.MinioClient;
import jakarta.annotation.Resource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: jingyan_liu
 * @CreateTime: 2025-07-21
 * @Description:
 * @Version: 1.0
 */


@Configuration
public class MinioConfig {
	
	@Resource
	private MinioProperties minioProperties;
	
	@Bean
	public MinioClient minioClient() {
		// 构建 Minio 客户端
		return MinioClient.builder()
				.endpoint(minioProperties.getEndpoint())
				.credentials(minioProperties.getAccessKey(), minioProperties.getSecretKey())
				.build();
	}
}
